﻿using Knlght.Domain;
using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Knight.Models.Entity
{
    /// <summary>
    /// 商品一级类目
    /// </summary>
    public class ClassACommodity:TEntityBase
    {
        public int Id { get; set; }
        public string Name { get; set; }
        
        public bool IsShow { get; set; }    
        public int DisplayIndex { get; set; }
    }

    public class ClassACommodityMapping : EntityTypeConfiguration<ClassACommodity>
    {
        public ClassACommodityMapping()
        {
            // 设置表名
            this.ToTable("T" + nameof(ClassACommodity));
            //设置主键
            this.HasKey(p => p.Id);
        }
    }
}
